<?php
include '../connect/common_start.php';
if(isset($_REQUEST['post_id']))
{
	$post_id=$_REQUEST['post_id'];
	$sql="SELECT SUM(l.`like`) as total FROM `like` l WHERE l.id_post='$post_id'";
	$result=mysql_query($sql);
	if(mysql_num_rows($result)>0){
		$r = mysql_fetch_assoc($result);
		echo json_encode($r);
	}else{
		echo '[]';
	}
}
include '../connect/common_end.php';
?>
